/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Tag;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author ajou
 */
@Entity
@XmlRootElement
public class QuestionEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    
    @Column(name="QUESTION")
    private String quest;
    @Column(name="CHOICE_ONE")
    private String choiceOne;
    @Column(name="CHOICE_TWO")
    private String choiceTwo;
    @Column(name="CHOICE_THREE")
    private String choiceThree;
    @Column(name="CHOICE_FOUR")
    private String choiceFour;
    @Column(name="ANSWER")
    int answer;
    @Column(name="ROOMID")
    int roomId;
    @Column(name="QUESTNUM")
    private int questNum;

    public QuestionEntity(String quest, String one, String two, String three, String four, int ans, int num) {
        this.quest = quest;
        this.choiceOne = one;
        this.choiceTwo = two;
        this.choiceThree = three;
        this.choiceFour = four;
        this.answer = ans;
        this.questNum = num;
    }
    
    public QuestionEntity() {
        
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getQuest() {
        return quest;
    }

    public void setQuest(String quest) {
        this.quest = quest;
    }

    public String getChoiceOne() {
        return choiceOne;
    }

    public void setChoiceOne(String choiceOne) {
        this.choiceOne = choiceOne;
    }

    public String getChoiceTwo() {
        return choiceTwo;
    }

    public void setChoiceTwo(String choiceTwo) {
        this.choiceTwo = choiceTwo;
    }

    public String getChoiceThree() {
        return choiceThree;
    }

    public void setChoiceThree(String choiceThree) {
        this.choiceThree = choiceThree;
    }

    public String getChoiceFour() {
        return choiceFour;
    }

    public void setChoiceFour(String choiceFour) {
        this.choiceFour = choiceFour;
    }

    public int getAnswer() {
        return answer;
    }

    public void setAnswer(int answer) {
        this.answer = answer;
    }

    public int getRoomId() {
        return roomId;
    }

    public void setRoomId(int roomId) {
        this.roomId = roomId;
    }

    public int getQuestNum() {
        return questNum;
    }

    public void setQuestNum(int questNum) {
        this.questNum = questNum;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof QuestionEntity)) {
            return false;
        }
        QuestionEntity other = (QuestionEntity) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Tag.QuestionEntity[ id=" + id + " ]";
    }
    
}
